package tongkeyon.create.prototype.improve;


import java.io.IOException;

/**
 * @Author: keyon <tongkeyon@163.com>
 * @Date: 2020/2/18 11:11
 * @Version 1.0
 */
public class Main {
    public static void main(String[] args) throws CloneNotSupportedException, IOException, ClassNotFoundException {
        Sheep1 a = new Sheep1("a", 1);
        Sheep1 sheep1 = (Sheep1) a.clone();
        System.out.println(sheep1);
        System.out.println(a==sheep1);


        Sheep2 sheep2 = new Sheep2("111", 12, a);
        Object clone = sheep2.clone();
        System.out.println(clone ==sheep2);


        Object o = sheep2.copy();
        System.out.println(o==sheep2);
    }
}
